3.1.24 \(\int (b \tan ^2(c+d x))^{5/2} \, dx\) [24]

Optimal. Leaf size=98 \[ -\frac {b^2 \cot (c+d x) \log (\cos (c+d x)) \sqrt {b \tan ^2(c+d x)}}{d}-\frac {b^2 \tan (c+d x) \sqrt {b \tan ^2(c+d x)}}{2 d}+\frac {b^2 \tan ^3(c+d x) \sqrt {b \tan ^2(c+d x)}}{4 d} \]

[Out]

-b^2*cot(d*x+c)*ln(cos(d*x+c))*(b*tan(d*x+c)^2)^(1/2)/d-1/2*b^2*(b*tan(d*x+c)^2)^(1/2)*tan(d*x+c)/d+1/4*b^2*(b
*tan(d*x+c)^2)^(1/2)*tan(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3739, 3554, 3556} \begin {gather*} -\frac {b^2 \tan (c+d x) \sqrt {b \tan ^2(c+d x)}}{2 d}+\frac {b^2 \tan ^3(c+d x) \sqrt {b \tan ^2(c+d x)}}{4 d}-\frac {b^2 \cot (c+d x) \sqrt {b \tan ^2(c+d x)} \log (\cos (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(b*Tan[c + d*x]^2)^(5/2),x]

[Out]

-((b^2*Cot[c + d*x]*Log[Cos[c + d*x]]*Sqrt[b*Tan[c + d*x]^2])/d) - (b^2*Tan[c + d*x]*Sqrt[b*Tan[c + d*x]^2])/(
2*d) + (b^2*Tan[c + d*x]^3*Sqrt[b*Tan[c + d*x]^2])/(4*d)

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3739

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Tan[e + f*x]^n)^FracPart[p]/(Tan[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \left (b \tan ^2(c+d x)\right )^{5/2} \, dx &=\left (b^2 \cot (c+d x) \sqrt {b \tan ^2(c+d x)}\right ) \int \tan ^5(c+d x) \, dx\\ &=\frac {b^2 \tan ^3(c+d x) \sqrt {b \tan ^2(c+d x)}}{4 d}-\left (b^2 \cot (c+d x) \sqrt {b \tan ^2(c+d x)}\right ) \int \tan ^3(c+d x) \, dx\\ &=-\frac {b^2 \tan (c+d x) \sqrt {b \tan ^2(c+d x)}}{2 d}+\frac {b^2 \tan ^3(c+d x) \sqrt {b \tan ^2(c+d x)}}{4 d}+\left (b^2 \cot (c+d x) \sqrt {b \tan ^2(c+d x)}\right ) \int \tan (c+d x) \, dx\\ &=-\frac {b^2 \cot (c+d x) \log (\cos (c+d x)) \sqrt {b \tan ^2(c+d x)}}{d}-\frac {b^2 \tan (c+d x) \sqrt {b \tan ^2(c+d x)}}{2 d}+\frac {b^2 \tan ^3(c+d x) \sqrt {b \tan ^2(c+d x)}}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.40, size = 56, normalized size = 0.57 \begin {gather*} -\frac {\cot (c+d x) \left (-1+2 \cot ^2(c+d x)+4 \cot ^4(c+d x) \log (\cos (c+d x))\right ) \left (b \tan ^2(c+d x)\right )^{5/2}}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(b*Tan[c + d*x]^2)^(5/2),x]

[Out]

-1/4*(Cot[c + d*x]*(-1 + 2*Cot[c + d*x]^2 + 4*Cot[c + d*x]^4*Log[Cos[c + d*x]])*(b*Tan[c + d*x]^2)^(5/2))/d

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 58, normalized size = 0.59

method result size
derivativedivides \(\frac {\left (b \left (\tan ^{2}\left (d x +c \right )\right )\right )^{\frac {5}{2}} \left (\tan ^{4}\left (d x +c \right )-2 \left (\tan ^{2}\left (d x +c \right )\right )+2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )\right )}{4 d \tan \left (d x +c \right )^{5}}\) \(58\)
default \(\frac {\left (b \left (\tan ^{2}\left (d x +c \right )\right )\right )^{\frac {5}{2}} \left (\tan ^{4}\left (d x +c \right )-2 \left (\tan ^{2}\left (d x +c \right )\right )+2 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )\right )}{4 d \tan \left (d x +c \right )^{5}}\) \(58\)
risch \(\frac {b^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, x}{{\mathrm e}^{2 i \left (d x +c \right )}-1}-\frac {2 b^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left (d x +c \right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) d}-\frac {4 i b^{2} \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{6 i \left (d x +c \right )}+{\mathrm e}^{4 i \left (d x +c \right )}+{\mathrm e}^{2 i \left (d x +c \right )}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} d}-\frac {i b^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) d}\) \(300\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*tan(d*x+c)^2)^(5/2),x,method=_RETURNVERBOSE)

[Out]

1/4/d*(b*tan(d*x+c)^2)^(5/2)*(tan(d*x+c)^4-2*tan(d*x+c)^2+2*ln(1+tan(d*x+c)^2))/tan(d*x+c)^5

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 47, normalized size = 0.48 \begin {gather*} \frac {b^{\frac {5}{2}} \tan \left (d x + c\right )^{4} - 2 \, b^{\frac {5}{2}} \tan \left (d x + c\right )^{2} + 2 \, b^{\frac {5}{2}} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*tan(d*x+c)^2)^(5/2),x, algorithm="maxima")

[Out]

1/4*(b^(5/2)*tan(d*x + c)^4 - 2*b^(5/2)*tan(d*x + c)^2 + 2*b^(5/2)*log(tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 74, normalized size = 0.76 \begin {gather*} \frac {{\left (b^{2} \tan \left (d x + c\right )^{4} - 2 \, b^{2} \tan \left (d x + c\right )^{2} - 2 \, b^{2} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) - 3 \, b^{2}\right )} \sqrt {b \tan \left (d x + c\right )^{2}}}{4 \, d \tan \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*tan(d*x+c)^2)^(5/2),x, algorithm="fricas")

[Out]

1/4*(b^2*tan(d*x + c)^4 - 2*b^2*tan(d*x + c)^2 - 2*b^2*log(1/(tan(d*x + c)^2 + 1)) - 3*b^2)*sqrt(b*tan(d*x + c
)^2)/(d*tan(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (b \tan ^{2}{\left (c + d x \right )}\right )^{\frac {5}{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*tan(d*x+c)**2)**(5/2),x)

[Out]

Integral((b*tan(c + d*x)**2)**(5/2), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 696 vs. \(2 (88) = 176\).
time = 1.16, size = 696, normalized size = 7.10 \begin {gather*} -\frac {{\left (2 \, b^{2} \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{4} \tan \left (c\right )^{4} + 3 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 8 \, b^{2} \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 2 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 8 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 2 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{2} \tan \left (c\right )^{4} + 12 \, b^{2} \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{4} - 8 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{3} \tan \left (c\right ) + 4 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 8 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right ) \tan \left (c\right )^{3} - b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (c\right )^{4} - 8 \, b^{2} \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right ) \tan \left (c\right ) + 2 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right )^{2} - 8 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (d x\right ) \tan \left (c\right ) + 2 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) \tan \left (c\right )^{2} + 2 \, b^{2} \log \left (\frac {4 \, {\left (\tan \left (d x\right )^{4} \tan \left (c\right )^{2} - 2 \, \tan \left (d x\right )^{3} \tan \left (c\right ) + \tan \left (d x\right )^{2} \tan \left (c\right )^{2} + \tan \left (d x\right )^{2} - 2 \, \tan \left (d x\right ) \tan \left (c\right ) + 1\right )}}{\tan \left (c\right )^{2} + 1}\right ) \mathrm {sgn}\left (\tan \left (d x + c\right )\right ) + 3 \, b^{2} \mathrm {sgn}\left (\tan \left (d x + c\right )\right )\right )} \sqrt {b}}{4 \, {\left (d \tan \left (d x\right )^{4} \tan \left (c\right )^{4} - 4 \, d \tan \left (d x\right )^{3} \tan \left (c\right )^{3} + 6 \, d \tan \left (d x\right )^{2} \tan \left (c\right )^{2} - 4 \, d \tan \left (d x\right ) \tan \left (c\right ) + d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*tan(d*x+c)^2)^(5/2),x, algorithm="giac")

[Out]

-1/4*(2*b^2*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*t
an(c) + 1)/(tan(c)^2 + 1))*sgn(tan(d*x + c))*tan(d*x)^4*tan(c)^4 + 3*b^2*sgn(tan(d*x + c))*tan(d*x)^4*tan(c)^4
 - 8*b^2*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(
c) + 1)/(tan(c)^2 + 1))*sgn(tan(d*x + c))*tan(d*x)^3*tan(c)^3 + 2*b^2*sgn(tan(d*x + c))*tan(d*x)^4*tan(c)^2 -
8*b^2*sgn(tan(d*x + c))*tan(d*x)^3*tan(c)^3 + 2*b^2*sgn(tan(d*x + c))*tan(d*x)^2*tan(c)^4 + 12*b^2*log(4*(tan(
d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 +
1))*sgn(tan(d*x + c))*tan(d*x)^2*tan(c)^2 - b^2*sgn(tan(d*x + c))*tan(d*x)^4 - 8*b^2*sgn(tan(d*x + c))*tan(d*x
)^3*tan(c) + 4*b^2*sgn(tan(d*x + c))*tan(d*x)^2*tan(c)^2 - 8*b^2*sgn(tan(d*x + c))*tan(d*x)*tan(c)^3 - b^2*sgn
(tan(d*x + c))*tan(c)^4 - 8*b^2*log(4*(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d
*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*sgn(tan(d*x + c))*tan(d*x)*tan(c) + 2*b^2*sgn(tan(d*x + c))*tan
(d*x)^2 - 8*b^2*sgn(tan(d*x + c))*tan(d*x)*tan(c) + 2*b^2*sgn(tan(d*x + c))*tan(c)^2 + 2*b^2*log(4*(tan(d*x)^4
*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(c)^2 + 1))*sg
n(tan(d*x + c)) + 3*b^2*sgn(tan(d*x + c)))*sqrt(b)/(d*tan(d*x)^4*tan(c)^4 - 4*d*tan(d*x)^3*tan(c)^3 + 6*d*tan(
d*x)^2*tan(c)^2 - 4*d*tan(d*x)*tan(c) + d)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (b\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )}^{5/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*tan(c + d*x)^2)^(5/2),x)

[Out]

int((b*tan(c + d*x)^2)^(5/2), x)

________________________________________________________________________________________